﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core
{
    /// <summary>
    /// Determine how to expose a property to the WebAPI.
    /// Watning: Affect links and metadata only, some property (e.g. Id, Name) which marked as DataMember will always be serialized.
    /// </summary>
    public enum WebAccessType : int 
    {
        /// <summary>
        /// Dont expose it on the web, default.
        /// </summary>
        None = 0,

        /// <summary>
        /// This means the proit's returned as DataMember.
        /// </summary>
        Property,

        /// <summary>
        /// Return the property when /entry/{entryId}/metadata is GETed.
        /// </summary>
        Metadata,

        /// <summary>
        /// Return the property value when /entry/{entryId}/{resourceName} is Geted.
        /// </summary>
        Resource,

        /// <summary>
        /// Invoke an action when /entry/{entryId}/{actionname} is POSTed
        /// </summary>
        Action
    }
}
